<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>VIEW</title>
    <link rel="stylesheet" href=""/>
    <script src="js/jquery.js"></script>
    <script src="js/underscore.js"></script>
    <script src="js/backbone.js"></script>
</head>
<body>
<div id="search_container"></div>
<script id="search_template" type="text/template">
    <label><%=label%></label>
    <input id="search_input" type="text"/>
    <input id="search_button" value="Search" type="button"/>
</script>
<script>
    $(function () {
        var SearchView = Backbone.View.extend({
            initialize: function () {
                this.render('wql');
            },
            render: function (label) {
                $(this.el).html(_.template($('#search_template').html())({label: label}));
            },
            events: {
                'click input[type=button]': 'doChange'
            },
            doChange: function (event) {
                this.render('wql' + $('#search_input').val());
            }
        });
        new SearchView({el: $('#search_container')});
    });
</script>
</body>
</html>